package com.gran.mydemo;

import android.app.Activity;
import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.ViewFlipper;
import com.replaceapkdemo.R;

public class TestGroupActivity extends ActivityGroup {
	private ViewFlipper vfl;
	private LinearLayout lout;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.testgroupactivity);
		vfl=(ViewFlipper) findViewById(R.id.windowfliper);
		lout=(LinearLayout) findViewById(R.id.mybottom);
		
		Intent it=new Intent();
		it.setClass(TestGroupActivity.this, GroupActivity1.class);
		Window w=this.getLocalActivityManager().startActivity("1", it);
		View v=w.getDecorView();
		//lout.addView(v, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
		vfl.addView(v);
		vfl.showNext();
		
	}
	
}
